package com.qywx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName DepartmentEntity
 * @Description: TODO
 * @Author wmj
 * @Date 2020/3/2
 * @Version V1.0
 **/
@Data
@Entity
@TableName("department")
public class DepartmentEntity implements Serializable {
    //部门代码
    @TableId(type= IdType.AUTO)
    private Long id;
    //部门名称
    private String name;
    //上级部门代码
    private Long parentid;
    //部门英文名称
    private String nameEn;
    //是否同步到微信 0:未同步 1:已同步 2：待更新
    private String isSynchronize;
    private String label;
    private List<DepartmentEntity> children;
    public DepartmentEntity(Long id, Long parentid,String name,String nameEn) {
        this.id = id;
        this.parentid = parentid;
        this.name = name;
        this.nameEn = nameEn;
    }
    public DepartmentEntity() {
    }
}
